﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 不用策略模式
{
    /// <summary>
    /// 价格计算帮助类
    /// </summary>
    internal class PriceCalculateHelper
    {
        /// <summary>
        /// 计算会员价格
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        internal static double CalVipPrice(Order order)
        {
            return order.UnitPrice * order.Count * 0.8;
        }

        /// <summary>
        /// 计算非会员价格
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        internal static double CalCommonPrice(Order order)
        {
            return order.UnitPrice * order.Count;
        }
    }
}
